package com.core.redis.util;

import org.apache.log4j.Logger;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisPubCluster {

	private static Logger logger = Logger.getLogger(RedisPubCluster.class);
	
	private static Jedis jedis = null;
	
	private RedisPubCluster(){
		JedisPool jp = new JedisPool("192.168.92.98",6380);
		
		jedis= jp.getResource();
		
		jedis.auth("CESIIREDIS");
	}
	
	private static class RedisPubClusterHolder{
		
		private static final RedisPubCluster INSTANCE = new RedisPubCluster();
		
	}
	
	public static RedisPubCluster getInCluster(){
		return RedisPubClusterHolder.INSTANCE;
	}
	
	public Jedis getJedis(){
		return jedis;
	}
}
